\(\int \frac {x \log (c (d+e x^2)^p)}{f+g x^2} \, dx\) [340]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [F]
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 70 \[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}+\frac {p \operatorname {PolyLog}\left (2,-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 g} \]

[Out]

1/2*ln(c*(e*x^2+d)^p)*ln(e*(g*x^2+f)/(-d*g+e*f))/g+1/2*p*polylog(2,-g*(e*x^2+d)/(-d*g+e*f))/g

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2525, 2441, 2440, 2438} \[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}+\frac {p \operatorname {PolyLog}\left (2,-\frac {g \left (e x^2+d\right )}{e f-d g}\right )}{2 g} \]

[In]

Int[(x*Log[c*(d + e*x^2)^p])/(f + g*x^2),x]

[Out]

(Log[c*(d + e*x^2)^p]*Log[(e*(f + g*x^2))/(e*f - d*g)])/(2*g) + (p*PolyLog[2, -((g*(d + e*x^2))/(e*f - d*g))])
/(2*g)

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2525

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{f+g x} \, dx,x,x^2\right ) \\ & = \frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}-\frac {(e p) \text {Subst}\left (\int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx,x,x^2\right )}{2 g} \\ & = \frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}-\frac {p \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x^2\right )}{2 g} \\ & = \frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 g}+\frac {p \text {Li}_2\left (-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 g} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.91 \[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )+p \operatorname {PolyLog}\left (2,\frac {g \left (d+e x^2\right )}{-e f+d g}\right )}{2 g} \]

[In]

Integrate[(x*Log[c*(d + e*x^2)^p])/(f + g*x^2),x]

[Out]

(Log[c*(d + e*x^2)^p]*Log[(e*(f + g*x^2))/(e*f - d*g)] + p*PolyLog[2, (g*(d + e*x^2))/(-(e*f) + d*g)])/(2*g)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.74 (sec) , antiderivative size = 301, normalized size of antiderivative = 4.30

method result size
parts \(\frac {\ln \left (c \left (e \,x^{2}+d \right )^{p}\right ) \ln \left (g \,x^{2}+f \right )}{2 g}-\frac {p \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (e \,\textit {\_Z}^{2}+d \right )}{\sum }\left (\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \ln \left (g \,x^{2}+f \right )-\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \left (\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )+\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )\right )}{2 g}\) \(301\)
risch \(\frac {\ln \left (\left (e \,x^{2}+d \right )^{p}\right ) \ln \left (g \,x^{2}+f \right )}{2 g}-\frac {p \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (e \,\textit {\_Z}^{2}+d \right )}{\sum }\left (\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \ln \left (g \,x^{2}+f \right )-\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \left (\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )+\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )\right )}{2 g}+\frac {\left (\frac {i \pi \,\operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{2}-\frac {i \pi \,\operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{2}+\frac {i \pi {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{2}+\ln \left (c \right )\right ) \ln \left (g \,x^{2}+f \right )}{2 g}\) \(429\)

[In]

int(x*ln(c*(e*x^2+d)^p)/(g*x^2+f),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(c*(e*x^2+d)^p)/g*ln(g*x^2+f)-1/2/g*p*sum(ln(x-_alpha)*ln(g*x^2+f)-ln(x-_alpha)*(ln((RootOf(_Z^2*e*g+2*_
Z*_alpha*e*g-d*g+e*f,index=1)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1))+ln((RootOf(_Z^2*e*g+
2*_Z*_alpha*e*g-d*g+e*f,index=2)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)))-dilog((RootOf(_Z
^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1))-dilog((Roo
tOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)),_alp
ha=RootOf(_Z^2*e+d))

Fricas [F]

\[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\int { \frac {x \log \left ({\left (e x^{2} + d\right )}^{p} c\right )}{g x^{2} + f} \,d x } \]

[In]

integrate(x*log(c*(e*x^2+d)^p)/(g*x^2+f),x, algorithm="fricas")

[Out]

integral(x*log((e*x^2 + d)^p*c)/(g*x^2 + f), x)

Sympy [F]

\[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\int \frac {x \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{f + g x^{2}}\, dx \]

[In]

integrate(x*ln(c*(e*x**2+d)**p)/(g*x**2+f),x)

[Out]

Integral(x*log(c*(d + e*x**2)**p)/(f + g*x**2), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 138 vs. \(2 (65) = 130\).

Time = 0.20 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.97 \[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\frac {e p {\left (\frac {\log \left (e x^{2} + d\right ) \log \left (g x^{2} + f\right )}{e} - \frac {\log \left (g x^{2} + f\right ) \log \left (-\frac {e g x^{2} + e f}{e f - d g} + 1\right ) + {\rm Li}_2\left (\frac {e g x^{2} + e f}{e f - d g}\right )}{e}\right )}}{2 \, g} - \frac {p \log \left (e x^{2} + d\right ) \log \left (g x^{2} + f\right )}{2 \, g} + \frac {\log \left (g x^{2} + f\right ) \log \left ({\left (e x^{2} + d\right )}^{p} c\right )}{2 \, g} \]

[In]

integrate(x*log(c*(e*x^2+d)^p)/(g*x^2+f),x, algorithm="maxima")

[Out]

1/2*e*p*(log(e*x^2 + d)*log(g*x^2 + f)/e - (log(g*x^2 + f)*log(-(e*g*x^2 + e*f)/(e*f - d*g) + 1) + dilog((e*g*
x^2 + e*f)/(e*f - d*g)))/e)/g - 1/2*p*log(e*x^2 + d)*log(g*x^2 + f)/g + 1/2*log(g*x^2 + f)*log((e*x^2 + d)^p*c
)/g

Giac [F]

\[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\int { \frac {x \log \left ({\left (e x^{2} + d\right )}^{p} c\right )}{g x^{2} + f} \,d x } \]

[In]

integrate(x*log(c*(e*x^2+d)^p)/(g*x^2+f),x, algorithm="giac")

[Out]

integrate(x*log((e*x^2 + d)^p*c)/(g*x^2 + f), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {x \log \left (c \left (d+e x^2\right )^p\right )}{f+g x^2} \, dx=\int \frac {x\,\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{g\,x^2+f} \,d x \]

[In]

int((x*log(c*(d + e*x^2)^p))/(f + g*x^2),x)

[Out]

int((x*log(c*(d + e*x^2)^p))/(f + g*x^2), x)